package cn.johnyu.pojo;

import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.List;

@Schema(name = "Author", description = "作者")
public class Author {
    private Integer id;
    @Schema(description = "作者地址",example = "北京市海淀区")
    private String address;
    @ArraySchema(schema = @Schema(implementation = Book.class),minItems = 0,maxItems = 10)
    @Schema(description = "作者的书籍")
    private List<Book> books;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }
}
